<template>
	<div class="supply-chain-hall info-1200">
		<div class="server_titleBox">
			<div class="supply-title">
				<span class="supply-line-left"></span>
				<span class="supply-main-title">供应链大厅</span>
				<span class="supply-line-right"></span>
			</div>
			<div class="supply-chain-title">
				<p>Supply chain hall</p>
			</div>
		</div>
		<!-- 商家切换 -->
		<div class="business-main info-1200">
			<nuxt-link v-if="tabKey==1" to="/chain/sellOffer" class="business-more">更多</nuxt-link>
			<nuxt-link v-if="tabKey==2" to="/chain/buyOffer" class="business-more">更多</nuxt-link>
			<nuxt-link v-if="tabKey==3" to="/chain/purchaser" class="business-more">更多</nuxt-link>
			<a-tabs @change="tabChange">
	 			<a-tab-pane tab="精选供应商" key="1" >
	 				<ul class="select-supply">
	 					<li  v-for="(item,index) in supplyList" :key="index">
	 						<div class="business-pic">
	 							    <img :src="item.imgUrl">
	 							    <div class="business-mask">
		 							    <p class="wy-text-nowrap-5">{{item.explain}}</p>
		 							    <router-link to="/chain/sellOffer">
		 							 		<a-button>查看更多</a-button>
		 							 	</router-link>
	 							 	</div>
	 						</div>
	 						<div class="buseiness-compay">
		 							<h4 class="wy-text-nowrap">{{item.company}}</h4>
		 						    <p>{{item.title}}</p>
	 						</div>
	 					</li>
	 				</ul>
	 			</a-tab-pane>
	 			<a-tab-pane tab="优质采购商" key="2" >
	 				 <div class="supply-pruchaser">
	 				 	<ul>
	 				 		<li  v-for="(item,index) in purchList" :key="index">
	 				 			<img :src="item.logo">
	 				 			<h5 class="wy-text-nowrap">{{item.company}}</h5>
	 				 			<p>采购规模：{{item.scale}}</p>
	 				 			<router-link to="/chain/buyOffer">
	 				 			<a-button class="ant-btn-primary" type="primary">查看更多</a-button>
	 				 			</router-link>
	 				 		</li>
	 				 		
	 				 	</ul>
	 				 </div>
	 			</a-tab-pane>
				<a-tab-pane tab="供应链综合服务商" key="3" >
	 				<ul class="select-supply">
	 					<li  v-for="(item,index) in providerList" :key="index">
	 						<div class="business-pic">
	 							    <img :src="item.imgUrl">
	 							    <div class="business-mask">
		 							    <p class="wy-text-nowrap-5">{{item.explain}}</p>
		 							    <router-link to="/chain/purchaser">
		 							 		<a-button>查看更多</a-button>
		 							 	</router-link>
	 							 	</div>
	 						</div>
	 						<div class="buseiness-compay">
		 							<h4 class="wy-text-nowrap">{{item.company}}</h4>
		 						    <p>{{item.title}}</p>
	 						</div>
	 					</li>
	 				</ul>
	 			</a-tab-pane>
	   		</a-tabs>
		</div>
	</div>
</template>
<script>
import { chainData } from './../../../utils/chainData'
import { environment } from '@/server/environment'
export default {
    data() {
      return {
      	tabKey: 1,
        FileUploadUrl2:environment.FileUploadUrl2,
        supplyList: chainData.supply.slice(0,4),
				purchList: chainData.purch.slice(0,8),
				providerList: chainData.provider.slice(0,4),
      }
    },
    beforeCreate() {
    },
    created() {
    },
    watch: {},

    mounted: function() {

    },
    methods: {
    	tabChange (key) {
    		this.tabKey = key;
    	},
		replaceHtml(str){
			return str.replace(/<[^>]+>/g,'')
		}
    }
  }
</script>